﻿namespace MonetDbDataProviderTest
{
    using MonetDbDataProvider;

    public class BaseTest
    {
        public MonetDbConnection MonetDbConn
        {
            get
            {
                return
                    new MonetDbConnection("database=demo;host=localhost;port=50000;username=monetdb;password=monetdb;");
            }
        }

        public void RunSQL(string sql)
        {
            using (var cmd =
                    new MonetDbCommand(
                        new MonetDbConnection(
                            "database=demo;host=localhost;port=50000;username=monetdb;password=monetdb;")))
            {
                cmd.CommandText = sql;

                cmd.Connection.Open();
                cmd.ExecuteNonQuery();
                cmd.Connection.Close();
            }
        }
    }
}
